package com.atxiaodei.springbootrabbitmqfanoutconsumer.service.direct;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName FanoutDuanxinConsumer
 * @Deacription TODO
 * @Author 诸葛孔暗
 * @Date 2021/3/23 15:37
 * @Version 1.0
 **/
@Component
@RabbitListener(queues = {"duanxin.direct.queue"})
public class DirectDuanxinConsumer {


    // @RabbitHandler 代表此方法是一个消息接收的方法。该不要有返回值
    @RabbitHandler
    public void reviceMessage(String message){
        System.out.println("duanxin direct 接收到消息：->"+message);
    }


}
